import { http } from '@/utils/http'
import type {
  GetDoctorInfoParams,
  BaseDoctorInfo,
  WorkPlanResult,
  OnlineDoctorInfo,
} from '@/types/doctor'

export const getWorkPlan = (data: { date: string; doctorId: number }) => {
  return http<WorkPlanResult[]>({
    method: 'POST',
    url: '/registration/searchDoctorWorkPlanSchedule',
    data,
  })
}

export const getDoctorInfo = (data: GetDoctorInfoParams) => {
  return http<BaseDoctorInfo>({
    method: 'POST',
    url: '/doctor/searchDoctorInfoById',
    data,
  })
}

export const getOnlineDoctorList = (data: { subName: string | null; job: string | null }) => {
  return http<OnlineDoctorInfo[]>({
    method: 'POST',
    url: '/video_diagnose/searchOnlineDoctorList',
    data,
  })
}
